#include "TimerUnit.h"
#include "TimerKit.h"
#include <assert.h>
using namespace std;

CTimerUnit::CTimerUnit(string title) : m_title(title)
{
	m_start = clock();
}

CTimerUnit::~CTimerUnit(void)
{
	assert(m_ptr_tk);
	m_ptr_tk->AddTime(m_title, (double)(clock()-m_start)/CLOCKS_PER_SEC);
}